﻿using System;

namespace MyFramework.Common.Attributes
{
    /// <summary>
    /// Module order attribute
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
    public class ModuleOrderAttribute : Attribute
    {
        #region Fields

        /// <summary>
        /// The order
        /// </summary>
        private readonly int order;

        #endregion

        /// <summary>
        /// Initializes a new instance of the <see cref="ModuleOrderAttribute"/> class.
        /// </summary>
        /// <param name="order">The order.</param>
        public ModuleOrderAttribute(int order)
        {
            this.order = order;
        }

        /// <summary>
        /// Gets the order.
        /// </summary>
        /// <value>
        /// The order.
        /// </value>
        public int Order
        {
            get
            {
                return this.order;
            }
        }
    }
}
